<?php
require_once BaseUtil::getModulePath("base")  .  '/forms/BaseForm.php';

class EditSalePriceForm extends BaseForm {

    public function __construct (){

            parent::__construct();
            $this->setAction(HttpUtil::getUrl("promotion", "subeditsaleprice"));
            // salePrice
            $salePrice = new Zend_Form_Element_Text('salePrice');
            $salePrice->setLabel($this->translate->_('salePrice'));
            $salePrice->addFilter("StringTrim");
            $salePrice->setRequired(true);
            $salePrice->addValidator("float");

            // from
            $from = new Zend_Form_Element_Text('from');
            $from->setLabel($this->translate->_('from'));
            $from->addFilter("StringTrim");
            $from->setRequired(true);

            // to
            $to = new Zend_Form_Element_Text('to');
            $to->setLabel($this->translate->_('to'));
            $to->addFilter("StringTrim");
            $to->setRequired(true);

            $this->addElements(array($salePrice,$from,$to));


            $this->setElementDecorators(array(
            'ViewHelper',
            array(array('div' => 'HtmlTag'), array('tag' => 'div',"class" => "form_element")),
            ));
    }
}